//用户模块的请求api
import axios from '../utils/axiosInstance.js'

//新增类型
export const addCourse=(data)=>{
    return axios({
            method:"post",
            url:"/api/courses/add",
            data
          })
}
//课程分页查询
export const coursesPage=(params)=>{
    return axios({
        url:"/api/courses/page",
        params
    })
}
//用户端课程列表查询
export const coursesPageByUser=(params)=>{
    return axios({
        url:"/api/courses/userPage",
        params
    })
}
//用户端课程详情查询
export const coursesById=(id)=>{
    return axios({
        url:`/api/courses/${id}`,
    })
}
//查询我的课程
export const coursesByUid=(data)=>{
    return axios({
        url:`/api/courses/myCourse`,
        method:"post",
        data
    })
}
//热门课程
export const hotCourse=()=>{
    return axios({
        url:`/api/courses/hotCourse`,
    })
}


